package com.edroid.apkhooker.home;

import java.io.PrintWriter;
import java.lang.Thread.UncaughtExceptionHandler;

import android.app.Application;

import com.edroid.autorunner.Statics;
import com.edroid.autorunner.um.UserMaker;
import com.example.utils.Logger;

public class MyApplication extends Application {
	private static final Logger log = Logger.create("MyApplication");

	@Override
	public void onCreate() {
		super.onCreate();
		log.e("onCreate ");
		Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandler() {
			@Override
			public void uncaughtException(Thread t, Throwable e) {
				try{
					PrintWriter pw = new PrintWriter("/sdcard/UncaughtException.txt");
					e.printStackTrace(pw);
					pw.close();
				}catch(Exception e1){
					
				}
			}
		});
		Statics.read();
		UserMaker.initOriginal(this);
	}
}
